: > I am getting an error, a linker error to be precise,
: >
: > LINKER ERROR: Segment _TEXT exceeds 64K.
: >
: > I have tried to compile my program under every memory model and I still continue to get this error, the program itself is only two files, 1 CPP and a .H
: >
: > can anyone shed any light on this for me? I have no big arrays or memory allocations? I'm lost, sort of new to CPP too,
: >
: > The environment I am using is Borland C++ 3.1 MS-Dos.
: >
: > Thanks in advance
: > T.H.
: TH, you have lots of string constants! You can resolve this problem by
: making some of them data, placing them in the _DATA segment:
: char someString[] = "This is a string in the data segment";
: You may also want to check that your compiler can/does remove duplicate
: strings, e.g. it creates one copy of "string" for the following:
: printf ("string");
: strcpy (buf, "string");
: strcmp (buf, "string");
This might give some problems though (think about situations